<link rel="stylesheet" type="text/css" href="/assets/css/date_input.css">

<div class="boxed clearfix">
  <div class="common-tit">
    <h2>添加员工</h2>
    <span>人资管理 > 添加员工</span>
  </div>
  <div class="ad-box">
    <div class="account-infor">
      <div class="requir">
        <span>* 必填项</span>
      </div>
      <h3>
        <em>*</em>
        <span>账户信息</span>
      </h3>
      <div class="reg-ac clearfix">
        <input type="text" class="in-l mob required" placeholder="员工账号">
        <span></span>
        <input type="text" class="in-r pas" placeholder="请代填初始密码">
        <em>此账号已经被注册过</em>
      </div>
    </div>
    <div class="basic">
      <h3>
        <span>基本信息</span>
      </h3>
      <div class="staff-info">
        <div id="upload_avatar_container" class="camera">
          <div class="ca">
            <%= image_tag("/avatar.png", size: "150x166", alt: "头像" ,id: "employee_avatar_img")%>
          </div>
          <div id="upload_avatar" class="upl">本地上传</div>
          <input type="hidden" id="employee_avatar" value="">
        </div>
        <ul class="bs-box">
          <li>
            <i>*</i>
            <input type="text" class="in-l required" placeholder="这里输入文字">
            <input type="text" class="in-r" placeholder="别名 / 英文名">
          </li>
          <li>
            <i>*</i>
            <div class="list-box b-sex" choice="mandatory">
              <div class="downbtn">
                <span>请选择性别</span>
                <em></em>
              </div>
              <ul class="dropdown-menu">
                <li class="cho-tit">请选择性别</li>
                <li>男</li>
                <li>女</li>
              </ul>
            </div>
            <b>请选择</b>
            <input type="text" class="in-r required" placeholder="微信号">
            <strong>*</strong>
          </li>
          <li>
            <i>*</i>
            <input type="text" class="in-l mob required" placeholder="手机号">
            <div class="date-ibox">
              <input type="text" class="in-r date-input required" id="birthday" readOnly="true" placeholder="出生年月">
            </div>
            <strong>*</strong>
          </li>
          <li>
            <i>*</i>
            <input type="text" class="in-l required" placeholder="紧急联系人姓名">
            <input type="text" class="in-r required" placeholder="紧急联系人电话">
            <strong>*</strong>
          </li>
          <li>
            <i>*</i>
            <input type="text" class="in-a required" placeholder="联系地址">
          </li>
          <li>
            <i></i>
            <input type="text" class="in-a" placeholder="备注">
          </li>
        </ul>
      </div>
    </div>
    <div class="st-pos">
      <h3>
        <span>职位信息</span>
      </h3>
      <div class="pos-b clearfix">
          <div class="pos-info">
            <ul class="poi-box clearfix">
              <li>
                <div class="list-box spe clearfix" choice="mandatory">
                  <div class="downbtn">
                    <span>请选择部门</span>
                    <em></em>
                  </div>
                  <ul class="dropdown-menu">
                    <li class="cho-tit">请选择部门</li>
                    <% @departments.each do |department| %>
                      <li data_id="<%= department.id %>"><%= department.department_name %></li>
                    <% end %>
                  </ul>
                </div>
                <b>请选择</b>
              </li>
              <li id="choicePos">
                <div class="list-box spe clearfix" choice="mandatory">
                  <div class="downbtn">
                    <span>请选择职位</span>
                    <em></em>
                  </div>
                  <ul class="dropdown-menu">
                    <li class="cho-tit">请选择职位</li>
                    <% @positions.each do |position| %>
                      <li data_id="<%= position.id %>"><%= position.position_name %></li>
                    <% end %>
                  </ul>
                </div>
                <b>请选择</b>
              </li>
              <li class="p-t">
                <div class="list-box clearfix" choice="mandatory">
                  <div class="downbtn">
                    <span>请选择授课对象</span>
                    <em></em>
                  </div>
                  <ul class="dropdown-menu">
                    <li class="cho-tit">请选择授课对象</li>
                    <% Company::AGE_GROUP.each do |key, value| %>
                      <li><%= value %></li>
                    <% end %>
                  </ul>
                </div>
                <b>请选择</b>
              </li>
              <!-- <li class="p-t">
                <div class="list-box clearfix" choice="mandatory">
                  <div class="downbtn">
                    <span>请选择舞种</span>
                    <em></em>
                  </div>
                  <ul class="dropdown-menu">
                    <li class="cho-tit">请选择舞种</li>
                    <% Company::DANCE_TYPE.each do |key, value| %>
                      <li><%= value %></li>
                    <% end %>
                  </ul>
                </div>
                <b>请选择</b>
              </li> -->
              <% if @teacher_levels.present? %>
                <li class="p-t">
                  <div class="list-box spe clearfix" choice="mandatory">
                    <div class="downbtn">
                      <span>请选择导师等级</span>
                      <em></em>
                    </div>
                    <ul class="dropdown-menu">
                      <li class="cho-tit">请选择导师等级</li>
                      <% @teacher_levels.each do |teacher_level| %>
                        <li data_id="<%= teacher_level.id %>"><%= teacher_level.teacher_level %></li>
                      <% end %>
                    </ul>
                  </div>
                  <b>请选择</b>
                </li>
              <% end %>
              <li class="p-und">

                <% @studios.each do |studio| %>
                  <div class="pos-branch">
                    <div class="sub-con">
                      <div class="test-check">
                        <input type="checkbox" class="ck">
                        <div class="check">
                          <span></span>
                        </div>
                      </div>
                    </div>
                    <span data_id="<%= studio.id %>"><%= studio.name %></span>
                  </div>
                <% end %>


                <b>请选择至少一个分店</b>
              </li>
            </ul>
            <div id="careerInfo" class="comm-add">
              <span>添加</span>
              <div class="not-addpos">请至少添加一个职位</div>
            </div>
          </div>
      </div>
    </div>
    <div class="pay-info">
      <h3>
        <span>薪资信息</span>
      </h3>
      <div class="pos-b">
        <div class="base-pay">
          <div class="p-slj">
            <span>基本工资:</span>
            <input id="basePay" type="text" placeholder="金额" onkeyup="intNum(this)">
            <em>元/月</em>
          </div>
        </div>
      </div>

      <!-- 导师 -->
      <div class="pos-p occ-t clearfix">
        <h4>导师</h4>
        <div class="p-box">
          <div class="m-sl">
            <span>课时费:</span>
            <input type="text" placeholder="金额" onkeyup="intNum(this)">
            <em>元/人</em>
          </div>
          <div class="rad-sl clearfix">
            <div class="rad-box">
              <div class="p-sl">
                <input class="p-radio" type="radio" name="commission" value="固定提成" onkeyup="intNum(this)">
                <div class="ra-btn">
                  <span></span>
                </div>
                <span>固定提成</span>
                <div class="comm-con clearfix">
                  <input type="text" placeholder="提成费用" onkeyup="intNum(this)">
                  <em>元/人</em>
                </div>
              </div>
              <div class="p-sy clearfix">
                <input class="p-radio" type="radio" name="commission" value="阶段提成" onkeyup="intNum(this)">
                <div class="ra-btn">
                  <span></span>
                </div>
                <span>阶段提成</span>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> 人- </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>人 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>元/人</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
          </div>
          <div class="p-exc clearfix">
            <div class="p-exbox">
              <i>超出指标提成:</i>
              <div class="comm-con clearfix">
                  <div class="comm-box">
                    <div class="stage-box">
                      <span>0</span>
                    </div>
                    <em> - </em>
                    <input type="text" onkeyup="intNum(this)">
                    <strong>元 阶段</strong>
                    <div class="cx">
                      <em>提成比例为</em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>%</strong>
                      <div class="comm-add">添加</div>
                    </div>
                  </div>
              </div>
            </div>
          </div>
          <div class="p-sl">
            <span>私教提成:</span>
            <input id="personal" type="text" placeholder="提成比例" onkeyup="intNum(this)">
            <em>%</em>
          </div>
        </div>
      </div>

      <!-- 服务顾问 -->
      <div class="pos-p occ-a clearfix">
        <h4>服务顾问</h4>
        <div class="p-box">
            <div class="p-exc clearfix">
              <div class="p-exbox">
                <i>超出指标提成:</i>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> - </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>元 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>%</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
        </div>
      </div>
      <!-- 产品总监 -->
      <div class="pos-p occ-c clearfix">
        <h4>产品总监</h4>
        <div class="p-box">
            <div class="p-exc clearfix">
              <div class="p-exbox">
                <i>团队超出指标提成:</i>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> - </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>元 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>%</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
        </div>
      </div>
      <!-- 运营总监 -->
      <div class="pos-p occ-y clearfix">
        <h4>运营总监</h4>
        <div class="p-box">
            <div class="p-exc clearfix">
              <div class="p-exbox">
                <i>团队超出指标提成:</i>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> - </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>元 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>%</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
        </div>
      </div>
      <!-- 市场总监薪资 -->
      <div class="pos-p occ-s clearfix">
        <h4>市场总监</h4>
        <div class="p-box">
            <div class="p-exc clearfix">
              <div class="p-exbox">
                <i>团队超出指标提成:</i>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> - </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>人 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>%</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
        </div>
      </div>
      <!-- 市场专员 -->
      <div class="pos-p occ-m clearfix">
        <h4>市场专员</h4>
        <div class="p-box">
            <div class="p-exc clearfix">
              <div class="p-exbox pex">
                <i>超出指标提成:</i>
                <div class="comm-con clearfix">
                    <div class="comm-box">
                      <div class="stage-box">
                        <span>0</span>
                      </div>
                      <em> - </em>
                      <input type="text" onkeyup="intNum(this)">
                      <strong>人 阶段</strong>
                      <div class="cx">
                        <em>提成比例为</em>
                        <input type="text" onkeyup="intNum(this)">
                        <strong>%</strong>
                        <div class="comm-add">添加</div>
                      </div>
                    </div>
                </div>
              </div>
            </div>
        </div>
      </div>
      <% if @welfares.present? %>
        <div class="pos-b pos">
          <div class="welfare we-show clearfix">
            <div class="p-sub">
              <span class="sub-tit">福利补助:</span>
              <div class="wel-sub">
                <% @welfares.each do |welfare| %>
                  <div class="sub-n clearfix" data_id="<%= welfare.id %>">
                    <div class="sub-con">
                      <div class="test-check">
                        <input type="checkbox" class="ck">
                        <div class="check">
                          <span></span>
                        </div>
                      </div>
                    </div>
                    <span><%= welfare.welfare_name %></span>
                    <em><%= welfare.amount %>元/月</em>
                  </div>
                <% end %>
              </div>
            </div>
          </div>
        </div>
      <% end %>
      <%= tag(:input, :type => 'hidden', :name => 'utf-8',:value => "✓") %>
      <%= tag(:input, :type => "hidden", :name =>  request_forgery_protection_token.to_s, :value =>   form_authenticity_token) %>
      <div class="pay-btn">保存</div>
    </div>
  </div>
</div>

<script src="/assets/js/common-list.js"></script>
<script>
$(function(){
  $('.date-input').date_input();
});
</script>
